#include <comdef.h>
#include <gdiplus.h>
#include "PictureDisplayWindow.h"

#include <vector>
#include <map>

#ifndef CHART
#define CHART

namespace Chart
{

    class Chart
    {
    public:
        Chart(unsigned int width, unsigned int height);
        virtual ~Chart();
        virtual void plot();
    protected:
        Gdiplus::Graphics *chart_g;
        Gdiplus::Image *chart_img;
        PictureDisplayWindow *chart_window;
    };

    class Pie : public Chart
    {
    public:
        Pie();
        Pie(const std::map<std::string, unsigned int> &data);
        void set_data(const std::map<std::string, unsigned int> &data);
        void plot();
    private:
        std::map<std::string, unsigned int> data;
    };

    class LineChart : public Chart
    {
    public:
        LineChart();
        LineChart(std::vector<double> &x_axis, std::vector<double> &y_axis);
        void set_data(std::vector<double> &x_axis, std::vector<double> &y_axis);
        void plot();
    private:
        std::vector<double> x_axis, y_axis;
    };
}
#endif